<template>
    <div>
        <component :is="compName" />
    </div>
</template>

<script lang="ts">
import PcComp from './pc/index.vue';
import MobileComp from './mobile/index.vue';
import { isMobile } from '@/utils/util';
import { defineComponent, ref, unref, reactive, toRefs, computed } from 'vue';
export default defineComponent({
    components: {
        PcComp,
        MobileComp
    },
    setup() {
        const state = reactive<any>({});
        const compName = computed(() => {
            return isMobile() ? 'MobileComp' : 'PcComp';
        });
        return {
            ...toRefs(state),
            compName
        };
    }
});
</script>

<style scoped>
</style>